package pojo;

import java.util.Objects;

public class Account {
    private int id;
    private String pwd;
    private String sm;

    public Account() {
    }

    public Account(int id, String pwd, String sm) {
        this.id = id;
        this.pwd = pwd;
        this.sm = sm;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPwd() {
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
    }

    public String getSm() {
        return sm;
    }

    public void setSm(String sm) {
        this.sm = sm;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Account account = (Account) o;
        return id == account.id && Objects.equals(pwd, account.pwd) && Objects.equals(sm, account.sm);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, pwd, sm);
    }

    @Override
    public String toString() {
        return "Account{" +
                "id=" + id +
                ", pwd='" + pwd + '\'' +
                ", sm='" + sm + '\'' +
                '}';
    }
}
